' This class is "generated" and will be overwritten.
' Your customizations should be made in VehicleTypeRecord.vb

Imports System.Data.SqlTypes
Imports BaseClasses
Imports BaseClasses.Data
Imports BaseClasses.Data.SqlProvider

Namespace Training1.Business

''' <summary>
''' The generated superclass for the <see cref="VehicleTypeRecord"></see> class.
''' </summary>
''' <remarks>
''' This class is not intended to be instantiated directly.  To obtain an instance of this class, 
''' use the methods of the <see cref="VehicleTypeTable"></see> class.
''' </remarks>
''' <seealso cref="VehicleTypeTable"></seealso>
''' <seealso cref="VehicleTypeRecord"></seealso>

<Serializable()> Public Class BaseVehicleTypeRecord
	Inherits PrimaryKeyRecord
	

	Public Shared Shadows ReadOnly TableUtils As VehicleTypeTable = VehicleTypeTable.Instance

	' Constructors
 
	Protected Sub New()
		MyBase.New(TableUtils)
	End Sub

	Protected Sub New(ByVal record As PrimaryKeyRecord)
		MyBase.New(record, TableUtils)
	End Sub







#Region "Convenience methods to get/set values of fields"

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's VehicleType_.Id field.
	''' </summary>
	Public Function GetId0Value() As ColumnValue
		Return Me.GetValue(TableUtils.Id0Column)
	End Function

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's VehicleType_.Id field.
	''' </summary>
	Public Function GetId0FieldValue() As Int32
		Return CType(Me.GetValue(TableUtils.Id0Column).ToInt32(), Int32)
	End Function

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's VehicleType_.Make field.
	''' </summary>
	Public Function GetMakeValue() As ColumnValue
		Return Me.GetValue(TableUtils.MakeColumn)
	End Function

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's VehicleType_.Make field.
	''' </summary>
	Public Function GetMakeFieldValue() As String
		Return CType(Me.GetValue(TableUtils.MakeColumn).ToString(), String)
	End Function

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's VehicleType_.Make field.
	''' </summary>
	Public Sub SetMakeFieldValue(ByVal val As ColumnValue)
		Me.SetValue(val, TableUtils.MakeColumn)
	End Sub

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's VehicleType_.Make field.
	''' </summary>
	Public Sub SetMakeFieldValue(ByVal val As String)
		Dim colValue As ColumnValue = New ColumnValue(val)
		Me.SetValue(colValue, TableUtils.MakeColumn)
	End Sub

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's VehicleType_.Model field.
	''' </summary>
	Public Function GetModelValue() As ColumnValue
		Return Me.GetValue(TableUtils.ModelColumn)
	End Function

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's VehicleType_.Model field.
	''' </summary>
	Public Function GetModelFieldValue() As String
		Return CType(Me.GetValue(TableUtils.ModelColumn).ToString(), String)
	End Function

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's VehicleType_.Model field.
	''' </summary>
	Public Sub SetModelFieldValue(ByVal val As ColumnValue)
		Me.SetValue(val, TableUtils.ModelColumn)
	End Sub

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's VehicleType_.Model field.
	''' </summary>
	Public Sub SetModelFieldValue(ByVal val As String)
		Dim colValue As ColumnValue = New ColumnValue(val)
		Me.SetValue(colValue, TableUtils.ModelColumn)
	End Sub

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's VehicleType_.Year field.
	''' </summary>
	Public Function GetYearValue() As ColumnValue
		Return Me.GetValue(TableUtils.YearColumn)
	End Function

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's VehicleType_.Year field.
	''' </summary>
	Public Function GetYearFieldValue() As String
		Return CType(Me.GetValue(TableUtils.YearColumn).ToString(), String)
	End Function

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's VehicleType_.Year field.
	''' </summary>
	Public Sub SetYearFieldValue(ByVal val As ColumnValue)
		Me.SetValue(val, TableUtils.YearColumn)
	End Sub

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's VehicleType_.Year field.
	''' </summary>
	Public Sub SetYearFieldValue(ByVal val As String)
		Dim colValue As ColumnValue = New ColumnValue(val)
		Me.SetValue(colValue, TableUtils.YearColumn)
	End Sub



#End Region

#Region "Convenience methods to get field names"

	''' <summary>
	''' This is a convenience property that provides direct access to the value of the record's VehicleType_.Id field.
	''' </summary>
	Public Property Id0() As Int32
		Get 
			Return CType(Me.GetValue(TableUtils.Id0Column).ToInt32(), Int32)
		End Get
		Set (ByVal val As Int32) 
			Dim colValue As ColumnValue = New ColumnValue(val)
			Me.SetValue(colValue, TableUtils.Id0Column)
		End Set
	End Property


	''' <summary>
	''' This is a convenience method that can be used to determine that the column is set.
	''' </summary>
	Public ReadOnly Property Id0Specified() As Boolean
        Get
            Dim val As ColumnValue = Me.GetValue(TableUtils.Id0Column)
            If val Is Nothing OrElse val.IsNull Then
                Return False
            End If
            Return True
        End Get
    End Property

	''' <summary>
	''' This is a convenience method that can be used to get the default value of a column.
	''' </summary>
    Public ReadOnly Property Id0Default() As String
        Get
            Return TableUtils.Id0Column.DefaultValue
        End Get
    End Property

	''' <summary>
	''' This is a convenience property that provides direct access to the value of the record's VehicleType_.Make field.
	''' </summary>
	Public Property Make() As String
		Get 
			Return CType(Me.GetValue(TableUtils.MakeColumn).ToString(), String)
		End Get
		Set (ByVal Value As String) 
			Me.SetString(value, TableUtils.MakeColumn)
		End Set
	End Property


	''' <summary>
	''' This is a convenience method that can be used to determine that the column is set.
	''' </summary>
	Public ReadOnly Property MakeSpecified() As Boolean
        Get
            Dim val As ColumnValue = Me.GetValue(TableUtils.MakeColumn)
            If val Is Nothing OrElse val.IsNull Then
                Return False
            End If
            Return True
        End Get
    End Property

	''' <summary>
	''' This is a convenience method that can be used to get the default value of a column.
	''' </summary>
    Public ReadOnly Property MakeDefault() As String
        Get
            Return TableUtils.MakeColumn.DefaultValue
        End Get
    End Property

	''' <summary>
	''' This is a convenience property that provides direct access to the value of the record's VehicleType_.Model field.
	''' </summary>
	Public Property Model() As String
		Get 
			Return CType(Me.GetValue(TableUtils.ModelColumn).ToString(), String)
		End Get
		Set (ByVal Value As String) 
			Me.SetString(value, TableUtils.ModelColumn)
		End Set
	End Property


	''' <summary>
	''' This is a convenience method that can be used to determine that the column is set.
	''' </summary>
	Public ReadOnly Property ModelSpecified() As Boolean
        Get
            Dim val As ColumnValue = Me.GetValue(TableUtils.ModelColumn)
            If val Is Nothing OrElse val.IsNull Then
                Return False
            End If
            Return True
        End Get
    End Property

	''' <summary>
	''' This is a convenience method that can be used to get the default value of a column.
	''' </summary>
    Public ReadOnly Property ModelDefault() As String
        Get
            Return TableUtils.ModelColumn.DefaultValue
        End Get
    End Property

	''' <summary>
	''' This is a convenience property that provides direct access to the value of the record's VehicleType_.Year field.
	''' </summary>
	Public Property Year() As String
		Get 
			Return CType(Me.GetValue(TableUtils.YearColumn).ToString(), String)
		End Get
		Set (ByVal Value As String) 
			Me.SetString(value, TableUtils.YearColumn)
		End Set
	End Property


	''' <summary>
	''' This is a convenience method that can be used to determine that the column is set.
	''' </summary>
	Public ReadOnly Property YearSpecified() As Boolean
        Get
            Dim val As ColumnValue = Me.GetValue(TableUtils.YearColumn)
            If val Is Nothing OrElse val.IsNull Then
                Return False
            End If
            Return True
        End Get
    End Property

	''' <summary>
	''' This is a convenience method that can be used to get the default value of a column.
	''' </summary>
    Public ReadOnly Property YearDefault() As String
        Get
            Return TableUtils.YearColumn.DefaultValue
        End Get
    End Property



#End Region

End Class
End Namespace
